import request from '@/utils/request'

export function getPnames() {
  return request({
    url: 'http://localhost:8080/area/pnames',
    method: 'get'
  })
}

export function getByPnames(pname) {
    return request({
      url: 'http://localhost:8080/area/',
      method: 'get',
      params: {
        pname
      }
    })
}
export function getCode(name) { 
  return request({
    url: 'http://localhost:8080/area/byName',
    method: 'get',
    params: {
      name
    }
  })
}